using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Utility;
using BUS;
using DTO;
public partial class Admin_DangNhap : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!IsPostBack)
        {
            Session["UserName"] = "";
        }
    }
    protected void btn_DangNhap_Click(object sender, EventArgs e)
    {
        Criteria cri = new Criteria();
        cri.add(Condition.AND, tbNhanVienColumns.taikhoan.ToString(), Condition.EQUAL, txt_TaiKhoan.Text.ToString());
        int total = 0;
        tbNhanVienCollection nhanviencollection = tbNhanVienBUS.Get(cri.Criter, 0, 0, tbNhanVienColumns.manv.ToString(), OrderDirection.ASC.ToString(), out total);
        if (txt_TaiKhoan.Text == "Admin" && txt_MatKhau.Text == "123456")
        {
            Response.Redirect("~/Admin/SanPham_List.aspx");
        }
        else
        {
            lb_Error.Text = " tai khoan nay khong co that vui long nhap lai.";
        }
    }
}
